<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
	<title>函数原型的优与弊</title>
	<!-- // <script src="http://code.jquery.com/jquery-latest.js"></script> -->
	<script type="text/javascript" src="jquery-2.1.4"></script>
	<script type="text/javascript">

		function Book1(name) {
			this.bookName = name;
			this.getName = function() {
				return this.bookName
			}
		}
		var b1 = new Book1('javascript')
		var b2 = new Book1('JAVA')
		var b3 = new Book1('NODE')

		function Book2(name) {
			this.bookName = name;
		}
		Book2.prototype.getName = function() {
			return this.bookName
		}
		var p1 = new Book2('javascript')
		var p2 = new Book2('JAVA')
		var p3 = new Book2('NODE')


		jQuery = function( selector, context ) {
			return new jQuery.fn.init( selector, context );
		}

		jQuery.fn = jQuery.prototype = {
			//代码省略
		}

	</script>
</head>
<body>
	<div></div>
</body>
</html>